Post = function() {
	this.id = 0;
	this.uid = 0; // -1 means user is deleted
	this.name = '';
	this.title = '';
	this.content = '';
	this.floor = 0;
	this.time = 0;
	this.floor_link = ''; // same as url
	this.url = '';
	this.mark_link = '';
	this.scored = false;
}

Page = function() {
	this.url = '';
	this.number = 0; // page number
	this.posts = []; // array of Post
}

Thread = function() {
	this.title = '';
	this.url = '';
	this.pages = []; // array of Page
}

UserPostStat = function() {
	this.uid = 0;
	this.id = '';
	this.count = '';
	this.last_floor = 0;
	this.posts = [];
}

UserSignStat = function() {
	this.uid = 0;
	this.id = '';
	this.count = 0;
	this.last_sign_date = '';
}

function sort_ups(ups1, ups2) {
	return ups2.count - ups1.count; // default desending order
}

function sort_page(page1, page2) {
	return page1.number - page2.number;
}

Module = function() {
	this.url = null;
	this.title = null;
	this.last_check = 0;
	if (obj != null) {
		this.url = obj.url;
		this.title = obj.title;
		this.last_check = obj.last_check;
	}
}
